package common.interf;

import java.util.Date;

public interface IMyDateHandle {
	public String MyDateToString(Date d);

	public String MyDateTimeToString(Date d);

	public String MyTimeToString(Date d);

	public Date MyStringToDateTime(String s);

	public Date MyStringToDate(String s);

	public Date MyStringToTime(String s);

	public String MyStringToISODateString(String s);

	public String MyStringToISOTimeString(String s);

	public String MyStringToISODateTimeString(String s);

	public String MyISODateStringToString(String s);

	public String MyISOTimeStringToString(String s);

	public String MyISODateTimeStringToString(String s);

	public String MyDateStringToString(String s);

	public String getCurrentDTString();

	public String getCurrentDateString();

	public String getYestodayDateString();

	public String getTomorrowDateString();

	/**
	 * 计算两时间的小时差
	 * 
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	public Integer getHoursBetween(String startTime, String endTime);

	/**
	 * 判断时间格式是否正确
	 * 
	 * @param str
	 *            时间字符串，如：2004-2-30
	 * @param formatStr
	 *            时间格式字符串，如：YYYY-MM-dd
	 * @return
	 */
	public boolean validDate(String str, String formatStr);
}
